<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<input type="button" value="关闭窗口"  onclick="closeTheWindow();" />
		
		<input type="button" value="模块的窗口"  onclick="open22();" />
		
		<input type="button" value="打开新的窗口"  onclick="openNewWin();" />
	</body>
	
	<script>
	
		function openNewWin(){
			alert('111');
			open("onchange.html","xxx","");
		}
	
		function closeTheWindow(){
			var jg = window.confirm('您确认要关闭浏览器吗?');
			console.log(jg);
			if(jg){
				window.close();
			}
		}
		
		function open22(){
			//在chrome里面会有兼容性问题。
			window.showModalDialog('onchange.html',window,'dialogWidth=500px;dialogHeight=300px');
		}
	</script>
</html>
